/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author itachiu
 */
@Embeddable
public class PetPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "idPET")
    private int idPET;
    @Basic(optional = false)
    @Column(name = "OWNER_PERSON_PERSON_ID")
    private int ownerPersonPersonId;
    @Basic(optional = false)
    @Column(name = "MEDICAL_RECORD_idMEDICAL_RECORD")
    private int mEDICALRECORDidMEDICALRECORD;

    public PetPK() {
    }

    public PetPK(int idPET, int ownerPersonPersonId, int mEDICALRECORDidMEDICALRECORD) {
        this.idPET = idPET;
        this.ownerPersonPersonId = ownerPersonPersonId;
        this.mEDICALRECORDidMEDICALRECORD = mEDICALRECORDidMEDICALRECORD;
    }

    public int getIdPET() {
        return idPET;
    }

    public void setIdPET(int idPET) {
        this.idPET = idPET;
    }

    public int getOwnerPersonPersonId() {
        return ownerPersonPersonId;
    }

    public void setOwnerPersonPersonId(int ownerPersonPersonId) {
        this.ownerPersonPersonId = ownerPersonPersonId;
    }

    public int getMEDICALRECORDidMEDICALRECORD() {
        return mEDICALRECORDidMEDICALRECORD;
    }

    public void setMEDICALRECORDidMEDICALRECORD(int mEDICALRECORDidMEDICALRECORD) {
        this.mEDICALRECORDidMEDICALRECORD = mEDICALRECORDidMEDICALRECORD;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) idPET;
        hash += (int) ownerPersonPersonId;
        hash += (int) mEDICALRECORDidMEDICALRECORD;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof PetPK)) {
            return false;
        }
        PetPK other = (PetPK) object;
        if (this.idPET != other.idPET) {
            return false;
        }
        if (this.ownerPersonPersonId != other.ownerPersonPersonId) {
            return false;
        }
        if (this.mEDICALRECORDidMEDICALRECORD != other.mEDICALRECORDidMEDICALRECORD) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entity.PetPK[ idPET=" + idPET + ", ownerPersonPersonId=" + ownerPersonPersonId + ", mEDICALRECORDidMEDICALRECORD=" + mEDICALRECORDidMEDICALRECORD + " ]";
    }
    
}
